﻿@inherits Microsoft.VisualStudio.Web.CodeGeneration.Templating.RazorTemplateBase
@using System.Collections.Generic
@using System.Linq
@@using Microsoft.AspNetCore.Identity
@{
    if (Model.UserClassNamespace != "Microsoft.AspNetCore.Identity")
    {
@:@@using @Model.UserClassNamespace
    }
}

@{
@:@@inject SignInManager<@Model.UserClass> SignInManager
@:@@inject UserManager<@Model.UserClass> UserManager
}

@{
@:<ul class="navbar-nav">
@:@@if (SignInManager.IsSignedIn(User))
@:{
@:    <li class="nav-item">
@:        <a id="manage" class="nav-link text-dark" asp-area="Identity" asp-page="/Account/Manage/Index" title="Manage">Hello @@UserManager.GetUserName(User)!</a>
@:    </li>
@:    <li class="nav-item">
      if (Model.IsRazorPagesProject)
      {
@:        <form id="logoutForm" class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@@Url.Page("/Index", new { area = "" })">
      }
      else
      {
@:        <form id="logoutForm" class="form-inline" asp-area="Identity" asp-page="/Account/Logout" asp-route-returnUrl="@@Url.Action("Index", "Home", new { area = "" })">
      }
@:            <button id="logout" type="submit" class="nav-link btn btn-link text-dark">Logout</button>
@:        </form>
@:    </li>
@:}
@:else
@:{
@:    <li class="nav-item">
@:        <a class="nav-link text-dark" id="register" asp-area="Identity" asp-page="/Account/Register">Register</a>
@:    </li>
@:    <li class="nav-item">
@:        <a class="nav-link text-dark" id="login" asp-area="Identity" asp-page="/Account/Login">Login</a>
@:    </li>
@:}
@:</ul>
}
